package com.ftg.learn.springboot.brand.service;

import com.ftg.learn.springboot.brand.mapper.brandMapper;
import com.ftg.learn.springboot.brand.pojo.brand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class brandService {

	@Autowired
	brandMapper bm;
	//按地区显示全部
	public List<brand> show(String bcategory){
		bcategory = ("all".equals(bcategory) ? null : bcategory);
		return bm.show(bcategory);
	}
	//显示全部
	public List<brand> showall() {

		return bm.showall();
	}
	//找热度第一
	public brand findFirstHeat(String bcategory){
		bcategory = ("all".equals(bcategory) ? null : bcategory);
		return bm.findFirstHeat(bcategory);
	}

	//数个数
	public int countall(){
		return bm.countall();
	}

	public String showPV() {

		return bm.showPV();
	}


	public brand findSecondHeat(String bcategory){
		bcategory = ("all".equals(bcategory) ? null : bcategory);
		return bm.findSecondHeat(bcategory);
	}
	public brand findThirdHead(String bcategory){
		bcategory = ("all".equals(bcategory) ? null : bcategory);
		return bm.findThirdHead(bcategory);
	}
	public brand findFourthHead(String bcategory){
		bcategory = ("all".equals(bcategory) ? null : bcategory);
		return bm.findFourthHead(bcategory);
	}
	public List<brand> showByEnjoy(){

		return bm.showByEnjoy();
	}
	public List<brand> showByHeat(){

		return bm.showByHeat();
	}


	public int dianzan(String id) {

		return bm.dianzan(id);
	}

	public List<brand> showExcellent() {

		return bm.showExcellent();
	}

	public int quxiaodianzan(String id) {

		return bm.quxiaodianzan(id);
	}
}
